<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>任意2个数求最大值</title>
	</head>
	<body>
		<script type="text/javascript">
			var num1=prompt("请输入第一个数字：");
			var num2=prompt("请输入第二个数字：");
			
			if(num1>num2){
				alert(num1);
			}
			
			else if(num1<num2){
				alert(num2);
			}
			else{
				alert("两数相等");
			}
			
		</script>
	</body>
</html>
